<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>EOS.IO: Single 64 bit Index table</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="eos-logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">EOS.IO
   &#160;<span id="projectnumber">DAWN3.0.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Single 64 bit Index table<div class="ingroups"><a class="el" href="group__contractdev.html">Smart Contract API Reference</a> &raquo; <a class="el" href="group__database.html">Database API</a> &raquo; <a class="el" href="group__database_c.html">Database C API</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>These methods interface with a simple table with 64 bit unique primary key and arbitrary binary data value.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gab722acdec925f6ac9c7a8a38f42c78d6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbi64.html#gab722acdec925f6ac9c7a8a38f42c78d6">store_i64</a> (<a class="el" href="group__types.html#ga3b44deb4b3b8d6ebab339d1263692117">account_name</a> scope, <a class="el" href="group__types.html#ga330cbf48637c876c57f78d03fd4730bb">table_name</a> table, const void *data, <a class="el" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a> datalen)</td></tr>
<tr class="separator:gab722acdec925f6ac9c7a8a38f42c78d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad2546b4764f3728f9bc7ffaf3953fb60"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbi64.html#gad2546b4764f3728f9bc7ffaf3953fb60">update_i64</a> (<a class="el" href="group__types.html#ga3b44deb4b3b8d6ebab339d1263692117">account_name</a> scope, <a class="el" href="group__types.html#ga330cbf48637c876c57f78d03fd4730bb">table_name</a> table, const void *data, <a class="el" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a> datalen)</td></tr>
<tr class="separator:gad2546b4764f3728f9bc7ffaf3953fb60"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad3fd3e46fff8f036d13405ffea3694ef"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbi64.html#gad3fd3e46fff8f036d13405ffea3694ef">load_i64</a> (<a class="el" href="group__types.html#ga3b44deb4b3b8d6ebab339d1263692117">account_name</a> scope, <a class="el" href="group__types.html#ga3b44deb4b3b8d6ebab339d1263692117">account_name</a> code, <a class="el" href="group__types.html#ga330cbf48637c876c57f78d03fd4730bb">table_name</a> table, void *data, <a class="el" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a> datalen)</td></tr>
<tr class="separator:gad3fd3e46fff8f036d13405ffea3694ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga75fc1182cf2fc76604bfce4b6066bd62"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbi64.html#ga75fc1182cf2fc76604bfce4b6066bd62">front_i64</a> (<a class="el" href="group__types.html#ga3b44deb4b3b8d6ebab339d1263692117">account_name</a> scope, <a class="el" href="group__types.html#ga3b44deb4b3b8d6ebab339d1263692117">account_name</a> code, <a class="el" href="group__types.html#ga330cbf48637c876c57f78d03fd4730bb">table_name</a> table, void *data, <a class="el" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a> datalen)</td></tr>
<tr class="separator:ga75fc1182cf2fc76604bfce4b6066bd62"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae7756b507e7dfc530127a936de8af77d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbi64.html#gae7756b507e7dfc530127a936de8af77d">back_i64</a> (<a class="el" href="group__types.html#ga3b44deb4b3b8d6ebab339d1263692117">account_name</a> scope, <a class="el" href="group__types.html#ga3b44deb4b3b8d6ebab339d1263692117">account_name</a> code, <a class="el" href="group__types.html#ga330cbf48637c876c57f78d03fd4730bb">table_name</a> table, void *data, <a class="el" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a> datalen)</td></tr>
<tr class="separator:gae7756b507e7dfc530127a936de8af77d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gab092362b1095ea7712a8cd3c5e23432d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbi64.html#gab092362b1095ea7712a8cd3c5e23432d">next_i64</a> (<a class="el" href="group__types.html#ga3b44deb4b3b8d6ebab339d1263692117">account_name</a> scope, <a class="el" href="group__types.html#ga3b44deb4b3b8d6ebab339d1263692117">account_name</a> code, <a class="el" href="group__types.html#ga330cbf48637c876c57f78d03fd4730bb">table_name</a> table, void *data, <a class="el" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a> datalen)</td></tr>
<tr class="separator:gab092362b1095ea7712a8cd3c5e23432d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2c28d72f6d9a769fd009e520aba1a23f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbi64.html#ga2c28d72f6d9a769fd009e520aba1a23f">previous_i64</a> (<a class="el" href="group__types.html#ga3b44deb4b3b8d6ebab339d1263692117">account_name</a> scope, <a class="el" href="group__types.html#ga3b44deb4b3b8d6ebab339d1263692117">account_name</a> code, <a class="el" href="group__types.html#ga330cbf48637c876c57f78d03fd4730bb">table_name</a> table, void *data, <a class="el" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a> datalen)</td></tr>
<tr class="separator:ga2c28d72f6d9a769fd009e520aba1a23f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga85171d550af40df7704b02c16fef3e29"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbi64.html#ga85171d550af40df7704b02c16fef3e29">lower_bound_i64</a> (<a class="el" href="group__types.html#ga3b44deb4b3b8d6ebab339d1263692117">account_name</a> scope, <a class="el" href="group__types.html#ga3b44deb4b3b8d6ebab339d1263692117">account_name</a> code, <a class="el" href="group__types.html#ga330cbf48637c876c57f78d03fd4730bb">table_name</a> table, void *data, <a class="el" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a> datalen)</td></tr>
<tr class="separator:ga85171d550af40df7704b02c16fef3e29"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae5a73591c3962aea98e02d42948865b8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbi64.html#gae5a73591c3962aea98e02d42948865b8">upper_bound_i64</a> (<a class="el" href="group__types.html#ga3b44deb4b3b8d6ebab339d1263692117">account_name</a> scope, <a class="el" href="group__types.html#ga3b44deb4b3b8d6ebab339d1263692117">account_name</a> code, <a class="el" href="group__types.html#ga330cbf48637c876c57f78d03fd4730bb">table_name</a> table, void *data, <a class="el" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a> datalen)</td></tr>
<tr class="separator:gae5a73591c3962aea98e02d42948865b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafc8eea376abd5f3807e3361ea0c455e1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__dbi64.html#gafc8eea376abd5f3807e3361ea0c455e1">remove_i64</a> (<a class="el" href="group__types.html#ga3b44deb4b3b8d6ebab339d1263692117">account_name</a> scope, <a class="el" href="group__types.html#ga330cbf48637c876c57f78d03fd4730bb">table_name</a> table, void *data)</td></tr>
<tr class="separator:gafc8eea376abd5f3807e3361ea0c455e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<dl class="section see"><dt>See also</dt><dd>table class in C++ API</dd></dl>
<p>Example </p><div class="fragment"><div class="line"><span class="preprocessor">#pragma pack(push, 1)</span></div><div class="line"><span class="keyword">struct </span><a class="code" href="structtest__model.html">test_model</a> {</div><div class="line">   <a class="code" href="group__types.html#ga3b44deb4b3b8d6ebab339d1263692117">account_name</a>   <a class="code" href="structtest__model.html#aa94809b8de753b3514062ea51bb1afef">name</a>;</div><div class="line">   <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> <a class="code" href="structtest__model.html#ad6c2d0fb30e34ab544f66092931b73f9">age</a>;</div><div class="line">   <a class="code" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a>      <a class="code" href="structtest__model.html#aef24416a78161629f1f7348029efa630">phone</a>;</div><div class="line">};</div><div class="line"></div><div class="line"><a class="code" href="structtest__model.html">test_model</a> alice{ <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(alice), 20, 4234622};</div><div class="line"><a class="code" href="structtest__model.html">test_model</a> bob  { <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(bob),   15, 11932435};</div><div class="line"><a class="code" href="structtest__model.html">test_model</a> carol{ <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(carol), 30, 545342453};</div><div class="line"><a class="code" href="structtest__model.html">test_model</a> dave { <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(dave),  46, 6535354};</div><div class="line"></div><div class="line"><a class="code" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a> res = <a class="code" href="group__dbi64.html#gab722acdec925f6ac9c7a8a38f42c78d6">store_i64</a>(CurrentCode(),  <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(test_table), &amp;dave,  <span class="keyword">sizeof</span>(<a class="code" href="structtest__model.html">test_model</a>));</div><div class="line">res = <a class="code" href="group__dbi64.html#gab722acdec925f6ac9c7a8a38f42c78d6">store_i64</a>(CurrentCode(), <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(test_table), &amp;carol, <span class="keyword">sizeof</span>(<a class="code" href="structtest__model.html">test_model</a>));</div><div class="line">res = <a class="code" href="group__dbi64.html#gab722acdec925f6ac9c7a8a38f42c78d6">store_i64</a>(CurrentCode(), <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(test_table), &amp;bob, <span class="keyword">sizeof</span>(<a class="code" href="structtest__model.html">test_model</a>));</div><div class="line">res = <a class="code" href="group__dbi64.html#gab722acdec925f6ac9c7a8a38f42c78d6">store_i64</a>(CurrentCOde(), <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(test_table), &amp;alice, <span class="keyword">sizeof</span>(<a class="code" href="structtest__model.html">test_model</a>));</div><div class="line"><a class="code" href="structtest__model.html">test_model</a> alice;</div><div class="line">alice.<a class="code" href="structtest__model.html#aa94809b8de753b3514062ea51bb1afef">name</a> = <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(alice);</div><div class="line">res = <a class="code" href="group__dbi64.html#gad3fd3e46fff8f036d13405ffea3694ef">load_i64</a>( <a class="code" href="group__actioncapi.html#ga5fcca014b53b0f15b9f9636325bae976">current_receiver</a>(), <a class="code" href="group__actioncapi.html#ga5fcca014b53b0f15b9f9636325bae976">current_receiver</a>(), <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(test_table), &amp;alice, <span class="keyword">sizeof</span>(<a class="code" href="structtest__model.html">test_model</a>) );</div><div class="line">ASSERT(res == <span class="keyword">sizeof</span>(<a class="code" href="structtest__model.html">test_model</a>) &amp;&amp; tmp.name == <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(alice) &amp;&amp; tmp.age == 20 &amp;&amp; tmp.phone == 4234622, <span class="stringliteral">&quot;load_i64&quot;</span>);</div><div class="line"></div><div class="line">res = <a class="code" href="group__dbi64.html#ga75fc1182cf2fc76604bfce4b6066bd62">front_i64</a>( <a class="code" href="group__actioncapi.html#ga5fcca014b53b0f15b9f9636325bae976">current_receiver</a>(), <a class="code" href="group__actioncapi.html#ga5fcca014b53b0f15b9f9636325bae976">current_receiver</a>(), <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(test_table), &amp;tmp, <span class="keyword">sizeof</span>(<a class="code" href="structtest__model.html">test_model</a>) );</div><div class="line">ASSERT(res == <span class="keyword">sizeof</span>(<a class="code" href="structtest__model.html">test_model</a>) &amp;&amp; tmp.name == <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(alice) &amp;&amp; tmp.age == 20 &amp;&amp; tmp.phone == 4234622, <span class="stringliteral">&quot;front_i64 1&quot;</span>);</div><div class="line"></div><div class="line">res = <a class="code" href="group__dbi64.html#gae7756b507e7dfc530127a936de8af77d">back_i64</a>( <a class="code" href="group__actioncapi.html#ga5fcca014b53b0f15b9f9636325bae976">current_receiver</a>(), <a class="code" href="group__actioncapi.html#ga5fcca014b53b0f15b9f9636325bae976">current_receiver</a>(), <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(test_table), &amp;tmp, <span class="keyword">sizeof</span>(<a class="code" href="structtest__model.html">test_model</a>) );</div><div class="line">ASSERT(res == <span class="keyword">sizeof</span>(<a class="code" href="structtest__model.html">test_model</a>) &amp;&amp; tmp.name == <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(dave) &amp;&amp; tmp.age == 46 &amp;&amp; tmp.phone == 6535354, <span class="stringliteral">&quot;back_i64 2&quot;</span>);</div><div class="line"></div><div class="line">res = <a class="code" href="group__dbi64.html#ga2c28d72f6d9a769fd009e520aba1a23f">previous_i64</a>( <a class="code" href="group__actioncapi.html#ga5fcca014b53b0f15b9f9636325bae976">current_receiver</a>(), <a class="code" href="group__actioncapi.html#ga5fcca014b53b0f15b9f9636325bae976">current_receiver</a>(), <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(test_table), &amp;tmp, <span class="keyword">sizeof</span>(<a class="code" href="structtest__model.html">test_model</a>) );</div><div class="line">ASSERT(res == <span class="keyword">sizeof</span>(<a class="code" href="structtest__model.html">test_model</a>) &amp;&amp; tmp.name == <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(carol) &amp;&amp; tmp.age == 30 &amp;&amp; tmp.phone == 545342453, <span class="stringliteral">&quot;carol previous&quot;</span>);</div><div class="line"></div><div class="line">res = <a class="code" href="group__dbi64.html#gab092362b1095ea7712a8cd3c5e23432d">next_i64</a>( <a class="code" href="group__actioncapi.html#ga5fcca014b53b0f15b9f9636325bae976">current_receiver</a>(), <a class="code" href="group__actioncapi.html#ga5fcca014b53b0f15b9f9636325bae976">current_receiver</a>(), <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(test_table), &amp;tmp, <span class="keyword">sizeof</span>(<a class="code" href="structtest__model.html">test_model</a>) );</div><div class="line">ASSERT(res == <span class="keyword">sizeof</span>(<a class="code" href="structtest__model.html">test_model</a>) &amp;&amp; tmp.name == <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(dave) &amp;&amp; tmp.age == 46 &amp;&amp; tmp.phone == 6535354, <span class="stringliteral">&quot;back_i64 2&quot;</span>);</div><div class="line"></div><div class="line"><a class="code" href="group__types.html#gaaa5d1cd013383c889537491c3cfd9aad">uint64_t</a> key = <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(alice);</div><div class="line">res = <a class="code" href="group__dbi64.html#gafc8eea376abd5f3807e3361ea0c455e1">remove_i64</a>(<a class="code" href="group__actioncapi.html#ga5fcca014b53b0f15b9f9636325bae976">current_receiver</a>(), <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(test_table), &amp;key);</div><div class="line">ASSERT(res == 1, <span class="stringliteral">&quot;remove alice&quot;</span>);</div><div class="line"></div><div class="line"><a class="code" href="structtest__model.html">test_model</a> lb;</div><div class="line">lb.<a class="code" href="structtest__model.html#aa94809b8de753b3514062ea51bb1afef">name</a> = <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(bob);</div><div class="line">res = <a class="code" href="group__dbi64.html#ga85171d550af40df7704b02c16fef3e29">lower_bound_i64</a>( <a class="code" href="group__actioncapi.html#ga5fcca014b53b0f15b9f9636325bae976">current_receiver</a>(), <a class="code" href="group__actioncapi.html#ga5fcca014b53b0f15b9f9636325bae976">current_receiver</a>(), <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(test_table), &amp;lb, <span class="keyword">sizeof</span>(<a class="code" href="structtest__model.html">test_model</a>) );</div><div class="line">ASSERT(res == <span class="keyword">sizeof</span>(<a class="code" href="structtest__model.html">test_model</a>) &amp;&amp; lb.<a class="code" href="structtest__model.html#aa94809b8de753b3514062ea51bb1afef">name</a> == <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(bob), <span class="stringliteral">&quot;lower_bound_i64 bob&quot;</span> );</div><div class="line"></div><div class="line"><a class="code" href="structtest__model.html">test_model</a> ub;</div><div class="line">ub.<a class="code" href="structtest__model.html#aa94809b8de753b3514062ea51bb1afef">name</a> = <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(alice);</div><div class="line">res = <a class="code" href="group__dbi64.html#gae5a73591c3962aea98e02d42948865b8">upper_bound_i64</a>( <a class="code" href="group__actioncapi.html#ga5fcca014b53b0f15b9f9636325bae976">current_receiver</a>(), <a class="code" href="group__actioncapi.html#ga5fcca014b53b0f15b9f9636325bae976">current_receiver</a>(), <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(test_table), &amp;ub, <span class="keyword">sizeof</span>(<a class="code" href="structtest__model.html">test_model</a>) );</div><div class="line">ASSERT(res == <span class="keyword">sizeof</span>(<a class="code" href="structtest__model.html">test_model</a>) &amp;&amp; ub.<a class="code" href="structtest__model.html#ad6c2d0fb30e34ab544f66092931b73f9">age</a> == 15 &amp;&amp; ub.<a class="code" href="structtest__model.html#aa94809b8de753b3514062ea51bb1afef">name</a> == <a class="code" href="group__types.html#gaf9c1edb0e0da55ec6ba09f32f6839529">N</a>(bob), <span class="stringliteral">&quot;upper_bound_i64 bob&quot;</span> );</div></div><!-- fragment --> <h2 class="groupheader">Function Documentation</h2>
<a id="gae7756b507e7dfc530127a936de8af77d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae7756b507e7dfc530127a936de8af77d">&#9670;&nbsp;</a></span>back_i64()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a> back_i64 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#ga3b44deb4b3b8d6ebab339d1263692117">account_name</a>&#160;</td>
          <td class="paramname"><em>scope</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga3b44deb4b3b8d6ebab339d1263692117">account_name</a>&#160;</td>
          <td class="paramname"><em>code</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga330cbf48637c876c57f78d03fd4730bb">table_name</a>&#160;</td>
          <td class="paramname"><em>table</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a>&#160;</td>
          <td class="paramname"><em>datalen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">scope</td><td>- the account scope that will be read, must exist in the transaction scopes list </td></tr>
    <tr><td class="paramname">code</td><td>- identifies the code that controls write-access to the data </td></tr>
    <tr><td class="paramname">table</td><td>- the ID/name of the table within the scope/code context to query </td></tr>
    <tr><td class="paramname">data</td><td>- location to copy the back record </td></tr>
    <tr><td class="paramname">datalen</td><td>- the maximum length of data to read, must be greater than sizeof(uint64_t)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the number of bytes read or -1 if no record found </dd></dl>

</div>
</div>
<a id="ga75fc1182cf2fc76604bfce4b6066bd62"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga75fc1182cf2fc76604bfce4b6066bd62">&#9670;&nbsp;</a></span>front_i64()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a> front_i64 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#ga3b44deb4b3b8d6ebab339d1263692117">account_name</a>&#160;</td>
          <td class="paramname"><em>scope</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga3b44deb4b3b8d6ebab339d1263692117">account_name</a>&#160;</td>
          <td class="paramname"><em>code</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga330cbf48637c876c57f78d03fd4730bb">table_name</a>&#160;</td>
          <td class="paramname"><em>table</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a>&#160;</td>
          <td class="paramname"><em>datalen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">scope</td><td>- the account scope that will be read, must exist in the transaction scopes list </td></tr>
    <tr><td class="paramname">code</td><td>- identifies the code that controls write-access to the data </td></tr>
    <tr><td class="paramname">table</td><td>- the ID/name of the table within the scope/code context to query </td></tr>
    <tr><td class="paramname">data</td><td>- location to copy the front record </td></tr>
    <tr><td class="paramname">datalen</td><td>- the maximum length of data to read, must be greater than sizeof(uint64_t)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the number of bytes read or -1 if no record found </dd></dl>

</div>
</div>
<a id="gad3fd3e46fff8f036d13405ffea3694ef"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad3fd3e46fff8f036d13405ffea3694ef">&#9670;&nbsp;</a></span>load_i64()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a> load_i64 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#ga3b44deb4b3b8d6ebab339d1263692117">account_name</a>&#160;</td>
          <td class="paramname"><em>scope</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga3b44deb4b3b8d6ebab339d1263692117">account_name</a>&#160;</td>
          <td class="paramname"><em>code</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga330cbf48637c876c57f78d03fd4730bb">table_name</a>&#160;</td>
          <td class="paramname"><em>table</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a>&#160;</td>
          <td class="paramname"><em>datalen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">scope</td><td>- the account scope that will be read, must exist in the transaction scopes list </td></tr>
    <tr><td class="paramname">code</td><td>- identifies the code that controls write-access to the data </td></tr>
    <tr><td class="paramname">table</td><td>- the ID/name of the table within the scope/code context to query </td></tr>
    <tr><td class="paramname">data</td><td>- location to copy the stored record, should be initialized with the key to get </td></tr>
    <tr><td class="paramname">datalen</td><td>- the maximum length of data to read, must be greater than sizeof(uint64_t)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the number of bytes read or -1 if key was not found </dd></dl>

</div>
</div>
<a id="ga85171d550af40df7704b02c16fef3e29"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga85171d550af40df7704b02c16fef3e29">&#9670;&nbsp;</a></span>lower_bound_i64()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a> lower_bound_i64 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#ga3b44deb4b3b8d6ebab339d1263692117">account_name</a>&#160;</td>
          <td class="paramname"><em>scope</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga3b44deb4b3b8d6ebab339d1263692117">account_name</a>&#160;</td>
          <td class="paramname"><em>code</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga330cbf48637c876c57f78d03fd4730bb">table_name</a>&#160;</td>
          <td class="paramname"><em>table</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a>&#160;</td>
          <td class="paramname"><em>datalen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">scope</td><td>- the account scope that will be read, must exist in the transaction scopes list </td></tr>
    <tr><td class="paramname">code</td><td>- identifies the code that controls write-access to the data </td></tr>
    <tr><td class="paramname">table</td><td>- the ID/name of the table within the scope/code context to query </td></tr>
    <tr><td class="paramname">data</td><td>- location to copy the lower bound. Should be initialized with the key to find lower bound of. </td></tr>
    <tr><td class="paramname">datalen</td><td>- the maximum length of data to read, must be greater than sizeof(uint64_t)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the number of bytes read or -1 if key was not found </dd></dl>

</div>
</div>
<a id="gab092362b1095ea7712a8cd3c5e23432d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab092362b1095ea7712a8cd3c5e23432d">&#9670;&nbsp;</a></span>next_i64()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a> next_i64 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#ga3b44deb4b3b8d6ebab339d1263692117">account_name</a>&#160;</td>
          <td class="paramname"><em>scope</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga3b44deb4b3b8d6ebab339d1263692117">account_name</a>&#160;</td>
          <td class="paramname"><em>code</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga330cbf48637c876c57f78d03fd4730bb">table_name</a>&#160;</td>
          <td class="paramname"><em>table</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a>&#160;</td>
          <td class="paramname"><em>datalen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">scope</td><td>- the account scope that will be read, must exist in the transaction scopes list </td></tr>
    <tr><td class="paramname">code</td><td>- identifies the code that controls write-access to the data </td></tr>
    <tr><td class="paramname">table</td><td>- the ID/name of the table within the scope/code context to query </td></tr>
    <tr><td class="paramname">data</td><td>- location to copy the next record. Should be initialized with the key to get next record. </td></tr>
    <tr><td class="paramname">datalen</td><td>- the maximum length of data to read, must be greater than sizeof(uint64_t)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the number of bytes read or -1 if key was not found </dd></dl>

</div>
</div>
<a id="ga2c28d72f6d9a769fd009e520aba1a23f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2c28d72f6d9a769fd009e520aba1a23f">&#9670;&nbsp;</a></span>previous_i64()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a> previous_i64 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#ga3b44deb4b3b8d6ebab339d1263692117">account_name</a>&#160;</td>
          <td class="paramname"><em>scope</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga3b44deb4b3b8d6ebab339d1263692117">account_name</a>&#160;</td>
          <td class="paramname"><em>code</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga330cbf48637c876c57f78d03fd4730bb">table_name</a>&#160;</td>
          <td class="paramname"><em>table</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a>&#160;</td>
          <td class="paramname"><em>datalen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">scope</td><td>- the account scope that will be read, must exist in the transaction scopes list </td></tr>
    <tr><td class="paramname">code</td><td>- identifies the code that controls write-access to the data </td></tr>
    <tr><td class="paramname">table</td><td>- the ID/name of the table within the scope/code context to query </td></tr>
    <tr><td class="paramname">data</td><td>- location to copy the previous record. Should be initialized with the key to get previous record. </td></tr>
    <tr><td class="paramname">datalen</td><td>- the maximum length of data to read, must be greater than sizeof(uint64_t)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the number of bytes read or -1 if key was not found </dd></dl>

</div>
</div>
<a id="gafc8eea376abd5f3807e3361ea0c455e1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafc8eea376abd5f3807e3361ea0c455e1">&#9670;&nbsp;</a></span>remove_i64()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a> remove_i64 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#ga3b44deb4b3b8d6ebab339d1263692117">account_name</a>&#160;</td>
          <td class="paramname"><em>scope</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga330cbf48637c876c57f78d03fd4730bb">table_name</a>&#160;</td>
          <td class="paramname"><em>table</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">scope</td><td>- the account socpe that will be read, must exist in the transaction scopes list </td></tr>
    <tr><td class="paramname">table</td><td>- the ID/name of the table withing the scope/code context to query </td></tr>
    <tr><td class="paramname">data</td><td>- must point to at lest 8 bytes containing primary key</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 if a record was removed, and 0 if no record with key was found </dd></dl>

</div>
</div>
<a id="gab722acdec925f6ac9c7a8a38f42c78d6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gab722acdec925f6ac9c7a8a38f42c78d6">&#9670;&nbsp;</a></span>store_i64()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a> store_i64 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#ga3b44deb4b3b8d6ebab339d1263692117">account_name</a>&#160;</td>
          <td class="paramname"><em>scope</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga330cbf48637c876c57f78d03fd4730bb">table_name</a>&#160;</td>
          <td class="paramname"><em>table</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a>&#160;</td>
          <td class="paramname"><em>datalen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">scope</td><td>- the account scope that will be read, must exist in the transaction scopes list </td></tr>
    <tr><td class="paramname">table</td><td>- the ID/name of the table within the current scope/code context to modify</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 if a new record was created, 0 if an existing record was updated</dd></dl>
<dl class="section pre"><dt>Precondition</dt><dd>datalen &gt;= sizeof(uint64_t) </dd>
<dd>
data is a valid pointer to a range of memory at least datalen bytes long </dd>
<dd>
*((uint64_t*)data) stores the primary key </dd>
<dd>
scope is declared by the current transaction </dd>
<dd>
this method is being called from an apply context (not validate or precondition)</dd></dl>
<dl class="section post"><dt>Postcondition</dt><dd>a record is either created or updated with the given scope and table.</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">if</td><td>called with an invalid precondition execution will be aborted </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gad2546b4764f3728f9bc7ffaf3953fb60"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad2546b4764f3728f9bc7ffaf3953fb60">&#9670;&nbsp;</a></span>update_i64()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a> update_i64 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#ga3b44deb4b3b8d6ebab339d1263692117">account_name</a>&#160;</td>
          <td class="paramname"><em>scope</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga330cbf48637c876c57f78d03fd4730bb">table_name</a>&#160;</td>
          <td class="paramname"><em>table</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a>&#160;</td>
          <td class="paramname"><em>datalen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">scope</td><td>- the account scope that will be read, must exist in the transaction scopes list </td></tr>
    <tr><td class="paramname">table</td><td>- the ID/name of the table within the current scope/code context to modify</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>1 if the record was updated, 0 if no record with key was found</dd></dl>
<dl class="section pre"><dt>Precondition</dt><dd>datalen &gt;= sizeof(uint64_t) </dd>
<dd>
data is a valid pointer to a range of memory at least datalen bytes long </dd>
<dd>
*((uint64_t*)data) stores the primary key </dd>
<dd>
scope is declared by the current transaction </dd>
<dd>
this method is being called from an apply context (not validate or precondition)</dd></dl>
<dl class="section post"><dt>Postcondition</dt><dd>a record is either created or updated with the given scope and table.</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">if</td><td>called with an invalid precondition execution will be aborted </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="gae5a73591c3962aea98e02d42948865b8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae5a73591c3962aea98e02d42948865b8">&#9670;&nbsp;</a></span>upper_bound_i64()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__types.html#ga0d2e949ab6a1bb62f1b295cc79bc1f60">int32_t</a> upper_bound_i64 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__types.html#ga3b44deb4b3b8d6ebab339d1263692117">account_name</a>&#160;</td>
          <td class="paramname"><em>scope</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga3b44deb4b3b8d6ebab339d1263692117">account_name</a>&#160;</td>
          <td class="paramname"><em>code</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga330cbf48637c876c57f78d03fd4730bb">table_name</a>&#160;</td>
          <td class="paramname"><em>table</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#ga06896e8c53f721507066c079052171f8">uint32_t</a>&#160;</td>
          <td class="paramname"><em>datalen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">scope</td><td>- the account scope that will be read, must exist in the transaction scopes list </td></tr>
    <tr><td class="paramname">code</td><td>- identifies the code that controls write-access to the data </td></tr>
    <tr><td class="paramname">table</td><td>- the ID/name of the table within the scope/code context to query </td></tr>
    <tr><td class="paramname">data</td><td>- location to copy the upper bound. Should be initialized with the key to find upper bound of. </td></tr>
    <tr><td class="paramname">datalen</td><td>- the maximum length of data to read, must be greater than sizeof(uint64_t)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the number of bytes read or -1 if key was not found </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
